﻿namespace MyCompany.MyProject.Model.Models.Tenants;

/// <summary>
/// 租户隔离特性
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class MultiTenantAttribute : Attribute
{
    /// <summary>
    /// 无参数构造函数
    /// </summary>
    public MultiTenantAttribute()
    {

    }
    /// <summary>
    /// 有参数构造函数
    /// </summary>
    /// <param name="tenantType"></param>
    public MultiTenantAttribute(TenantTypeEnum tenantType)
    {
        TenantType = tenantType;
    }
    /// <summary>
    /// 隔离分类
    /// </summary>
    public TenantTypeEnum TenantType { get; set; }
}
